cd ./dist 
rm -rf readme.md
touch readme.md

rm -rf pull.sh
touch pull.sh
echo "mv ./pull.sh ../pull.sh" >> pull.sh
echo "cd .." >> pull.sh
echo "rm -rf ./vue-test" >> pull.sh
echo "git clone https://gitee.com/bingyu123/vue-test.git ./vue-test" >> pull.sh

echo "mkdir /www/server/nginx/html/vue-test" >> pull.sh

# 复制到nginx的目录
echo "cp -r ./vue-test/* /www/server/nginx/html/vue-test/" >> pull.sh
echo "nginx -t" >> pull.sh
echo "nginx -s reload" >> pull.sh


echo "## 这是一个前端项目的测试文件要上线"  >> readme.md
mkdir ~/project/_dist
cp -r ../dist/* ~/project/_dist
cd ~/project/_dist
git init 
git add .
git commit -m 'payload'
git remote add origin https://gitee.com/bingyu123/vue-test.git
git push origin master -f
rm -rf ~/project/_dist
